/**
 * @file    WebOleInPlaceFrame.h
 * @brief   
 * @date    2005-03-15 15:55:23
 * @author  GengYong (gengyong@gmail.com)
 *
 */

#ifndef WEBWINDOW_HEADER_WEBOLEINPLACEFRAME_H
#define WEBWINDOW_HEADER_WEBOLEINPLACEFRAME_H
//----------------------------------------------------------

#include "WebWindowImpl.h"

namespace xessage_private {
	class WebOleInPlaceFrame:public IOleInPlaceFrame
	{
	public:
		WebOleInPlaceFrame(WebWindowImpl * app);
		virtual ~WebOleInPlaceFrame();
	public:
		virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID * ppvObj);
		virtual ULONG	STDMETHODCALLTYPE AddRef();
		virtual ULONG	STDMETHODCALLTYPE Release();
		virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND * lphwnd);
		virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
		virtual HRESULT STDMETHODCALLTYPE GetBorder(LPRECT lprectBorder);
		virtual HRESULT STDMETHODCALLTYPE RequestBorderSpace(LPCBORDERWIDTHS pborderwidths);
		virtual HRESULT STDMETHODCALLTYPE SetBorderSpace(LPCBORDERWIDTHS pborderwidths);
		virtual HRESULT STDMETHODCALLTYPE SetActiveObject(IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName);
		virtual HRESULT STDMETHODCALLTYPE InsertMenus(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths);
		virtual HRESULT STDMETHODCALLTYPE SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject);
		virtual HRESULT STDMETHODCALLTYPE RemoveMenus(HMENU hmenuShared);
		virtual HRESULT STDMETHODCALLTYPE SetStatusText(LPCOLESTR pszStatusText);
		virtual HRESULT STDMETHODCALLTYPE EnableModeless(BOOL fEnable);
		virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(LPMSG lpmsg, WORD wID);
	public:
		virtual HRESULT	STDMETHODCALLTYPE SetWindow(HWND hwnd);
	private:
		WebWindowImpl *		m_appImpl;
		HWND				m_window;
		LONG				m_refCount;
	};
}

//----------------------------------------------------------
#endif	//ifndef WEBWINDOW_HEADER_WEBOLEINPLACEFRAME_H
